// 主入口文件

import { formReg } from "./registry_module.js"
if (document.querySelector("#register")) {
    formReg()
}

import { login } from "./login_module.js"
if (document.querySelector("#login")) {
    login()
}

import { loginState, twoMenu, fixedHead, carbuy, indexRender, countDown, stairEffect } from "./index_module.js"
if (document.querySelector("#index")) {
    loginState()
    twoMenu()
    fixedHead()
    carbuy()
    indexRender()
    countDown('2021-6-19 12:00:00')
    setInterval(function() {
        countDown('2021-6-19 12:00:00')
    }, 1000)
    stairEffect()
}

import { renderList } from "./list_module.js"
if (document.querySelector("#list")) {
    loginState()
    renderList()
    fixedHead()
    carbuy()
}

import { goodDetail, buyNow, localdata } from "./detail_module.js"
if (document.querySelector("#detail")) {
    loginState()
    goodDetail()
    buyNow()
    carbuy()
    localdata()
}

import { cartlist, fixedFooter } from "./cartlist_module.js"
if (document.querySelector("#cartlist")) {
    loginState()
    cartlist()
    fixedHead()
    fixedFooter()
}